package neu.soft.controller;

import neu.soft.service.impl.DistributionOrderServiceImpl;
import neu.soft.vo.PageBean;
import neu.soft.vo.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/distributionOrder")
@CrossOrigin
public class DistributionOrderController {
    @Autowired
    private DistributionOrderServiceImpl distributionOrderService;

    @RequestMapping(value = "/addDistributionOrder")
    public ResultBean<Integer> addDistributionOrder(@RequestBody Map<String,Object> map){
        return distributionOrderService.addDistributionOrder(map);
    }

    @RequestMapping("/showAllDistributionOrder")
    public ResultBean<PageBean<Map<String,Object>>> showAllDistributionOrder(@RequestBody Map<String,Object> map){
        return distributionOrderService.showAllDistributionOrder(map);
    }
}
